RR Alert ( resource ; message0…message3, type ) -> item

item        integer   returns the item number user clicked to exit the alert
                    -1  ndicates external was unable to display the alert.
                    1  should be) the OK button.

resource   longint   contains the ALRT resource number to use.

message0…message3   string (255)

Whenever you use in the ALRT resource static text with the signs '^0' thru '^3' the strings (max. 255 characters) replace each of these.

You can also pass a string resource number in the same way you can use them with 4D for menus, buttons and static layout text. If message0 contains ":-16415,1" every occurence of the characters '^0' will be replaced with the contents of item 1 of STR# resource -16415 (inside the system file). When a STR# respource can't be found nothing will be displayed.

String resource -16395 in the System file contains the names of Macintosh machine types. Normally item 0 is not available, but when you use ":-16395,0" it will automatically get to the item with the name of the Macintosh you are currently using.

The system font (with most systems Chicago) will be used to display the messages.

type   integer    indicates what kind of standard icon is displayed in the 
                         top-left corner:
                            0  top icon
                            1  ote icon
                            2  arning icon
                            3  o icon
                 All other types are reserved and should not be used.

When you use ALRT resources from the System file, use them at your own risk. They may not be present in earlier or future versions of the System Software. You are able to use all ALRT and STR# resources from the structure file, the 4D Application and the System file.

When you create your own ALRT resources: item 1 should always be a button (OK) and when you want, use item 2 as the Cancel button.

See also ResEdit™ Reference (ResEdit version 2.1) page 53 and Inside Macintosh I page 409. And of course the Human Interface Guidelines and Human Interface Note #10 (Alert Box Guidelines).

See the 4D v3 Language Reference about using resource numbers.

This external displays an alert window with text you put into it using ResEdit or passing text thru the external. It allows you to use different items including icons, pictures etc. When you display the same alert several times after the other the stage info is normally used. This means you can set the default button and number of sounds for each occurence withing the ALRT resource.

In comparison with using ALERT or DIALOG to display a layout:
          - faster,
          - select the icon you want,
          - when displayed on top of a window with a selection, refreshing 
                     is halted,
          - access to system resources,
          - auto position (System 7 only).

History:
1.0b1 (14 March 1993) First beta release.

Acknowledgements
Thanks to Marco Piovanelli for his help and support regarding the Notification Mgr (not yet implemented).

© 1993-1994, René G.A. Ros
Postcardware.